package com.jinbo.sxzq;

import android.util.Log;

/***********棋子虎********************/
public class Chess_She extends Chess{
    private boolean skillflag;//技能指示器：是否处于隐身状态
    Chess_She(int type, int index, int[] location, int owner, GameControl gameControl) {
        /********初始化信息****************/
        super(index, location, owner, gameControl);
        this.type = type;
        this.name = ProjectConstants.ChessName.SHE;
        this.message = ProjectConstants.ChessMasage.SHE;
        this.type = ProjectConstants.ChessType.SHE;
        this.hp = 2;
        this.maxHp = 2;
        this.mp = 0;
        this.maxMp = 0;
        this.mobility = 2;
        this.maxmobility = 2;
        this.atk = 1;
        this.skillflag = true;
    }

    public void Action(){
        super.Action();
    }

    public void Move(Chess chess){
        super.Move(chess);
    }

    public void Attack(Chess chess){
        super.Attack(chess);
        Log.e("Skill——蛇" , "触发技能");
        skillflag = false;
    }

    public void RoundNext(){
        super.RoundNext();
    }

    public void Skill(){
        super.Skill();
    }

    public void Kill(Chess chess){
        super.Kill(chess);
        skillflag = true;
    }
    //写技能蛇：【隐匿】攻击前不会成为其他棋子的攻击对象，击杀敌方棋子获得【隐匿】
    public int getOwner(Chess chess){
        if(skillflag){//处于隐匿状态
            return chess.owner;
        }else{
            return owner;
        }
    }
}
